package com.dferreira.repository.data_models;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

/**
 * Created by dferreira on 7/13/14.
 * for LanguagesTeach
 */
@DatabaseTable(tableName = Dependency.TABLE_NAME)
public class Dependency {

    public static final String TABLE_NAME = "dependency";
    public static final String COLUMN_NAME_FOR_PACKAGE = "for_package";
    public static final String COLUMN_NAME_FROM_PACKAGE = "from_package";

    @DatabaseField(generatedId = true)
    private Integer id;

    @DatabaseField(foreign = true, columnName = COLUMN_NAME_FOR_PACKAGE)
    private PackageMetadata forPackage;
    @DatabaseField(foreign = true, columnName = COLUMN_NAME_FROM_PACKAGE, foreignAutoRefresh = true)
    private PackageMetadata fromPackage;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public PackageMetadata getForPackage() {
        return forPackage;
    }

    public void setForPackage(PackageMetadata forPackage) {
        this.forPackage = forPackage;
    }

    public PackageMetadata getFromPackage() {
        return fromPackage;
    }

    public void setFromPackage(PackageMetadata fromPackage) {
        this.fromPackage = fromPackage;
    }
}
